﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for ServiceBlo
/// </summary>
public class ServiceBlo
{
    #region "variable"
    private ServiceDao dao;
    private string _error;
    private ServiceDto dto;
    #endregion

    #region "properties" 
    public string Error
    {
        get { return _error; }
        set { _error = value; }
    }
    

    public ServiceDto Service
    {
        get { return dto; }
        set { dto = value; }
    }
    #endregion
    
   
	public ServiceBlo()
	{
        dao = new ServiceDao();
        dto = new ServiceDto();
	}

    public void InsertServiceType(string _serviceName, bool _status)
    {
        dao.InsertServiceType(_serviceName, _status);
    }
    public List<ServiceDto> SelectOtherServiceType()
    {
        return dao.SelectOtherServiceType();
    }
    public void DeleteServiceDetail(int id_SD)
    {
        dao.DeleteServiceDetail(id_SD);
    }
    public void UpdateServiceTypeStatus(int id_ST, bool _status)
    {
        dao.UpdateServiceTypeStatus(id_ST, _status);
    }
    public void UpdateServiceDetailStatus(int id_SD, bool _status)
    {
        dao.UpdateServiceDetailStatus(id_SD, _status);
    }
    public List<ServiceDto> SelectAllServicesType()
    {
        return dao.SelectAllServicesType();
    }
    public ServiceDto SelectService(string serviceName)
    {
        return dao.SelectService(serviceName);
    }
    public ServiceDto SelectServiceActive(string serviceName)
    {
        return dao.SelectServiceActive(serviceName);
    }
    public ServiceDto SelectOtherService()
    {
        return dao.SelectOtherService();
    }
    public void InsertServiceDetail(ServiceDetail _serviceDetail)
    {
        dao.InsertServiceDetail(_serviceDetail);
    }
    public void UpdateServiceType(ServiceDto _servicedto)
    {
        dao.UpdateServiceType(_servicedto);
    }
    public void UpdateServiceDetail(ServiceDetail _serviceDetail)
    {
        dao.UpdateServiceDetail(_serviceDetail);
    }
    public ServiceDto SelectBillAdv(int id_MN, int id_ST, bool billStatus, string orderby, string sort)
    {
        return dao.SelectBillAdv(id_MN,id_ST,billStatus,orderby,sort);
    }
}